import request from '@/utils/request'
let baseUrl = process.env.NODE_ENV === 'production' ? '/api/risk' : '/riskyf'
// 规则管理列表list
export const getConfigList = (data?: any) =>
  request({
    baseURL: baseUrl,
    url: '/std/rule/list',
    method: 'post',
    data
  })
// 删除规则
export const deleteConfig = (data?: any) =>
  request({
    baseURL: baseUrl,
    url: '/std/rule/delete',
    method: 'post',
    data
  })

// 更新历史
export const getConfighis = (data?: any) =>
  request({
    baseURL: baseUrl,
    url: '/std/rule/his',
    method: 'post',
    data
  })
// 规则类型
export const getTypemap = (data?: any) =>
  request({
    baseURL: baseUrl,
    url: '/std/rule/type-map',
    method: 'post',
    data
  })
// 更新规则
export const update = (data?: any) =>
  request({
    baseURL: baseUrl,
    url: '/std/rule/update',
    method: 'post',
    data
  })
// 规则上传
export const upload = (data?: any) =>
  request({
    baseURL: baseUrl,
    url: '/std/rule/upload',
    method: 'post',
    data
  })
export const uploadURL = baseUrl + '/std/rule/upload'
export const downloadURL = baseUrl + '/std/rule/download-template'
